#!/bin/sh

CONF_DIR=./conf

cd ${CONF_DIR}

# Generate RSA file 
openssl genrsa -des3 -out server.key 1024
openssl rsa -in server.key -out server.key

# Generate CSR file
openssl req -new -key server.key -out server.csr

# Sign the certification file.
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

rm -f server.csr

cd -
